import java.util.Scanner;

/**
 * User interface io device
 * Waits for user input then unblocks passes process. currently unimplemented.
 * @author Patrick Black
 *
 */
public class UI implements Runnable{
	// referece to calling pc and process objects.
	CPU cpu;
	Process process;
	/**
	 * 
	 * @param cpu calling cpu
	 * @param process calling process
	 */
	public UI(CPU cpu, Process process) {
		this.cpu = cpu;
		this.process = process;
	}
	
	/**
	 * waits on input from the user then unblocks process. currently doesnt accept input. unblocks regardless.
	 */
	@Override
	public void run() {
		
			cpu.unblock(process);
			System.out.println("System call for process " + process.fetchName() + " completed. " +
				"Process " + process.fetchName() + " no longer blocked.");
			System.out.println();
		
		
		
	}

}
